package cloud.xlh.controller;

import cloud.xlh.client.file.dto.FileHandleDTO;
import cloud.xlh.client.file.dto.MountSettingDTO;
import cloud.xlh.client.file.service.FileClientService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2023/8/5 14:51
 * @ Description:
 */
@RestController("/file")
public class FileController {
    @Resource
    private FileClientService fileClientService;

    @PostMapping("fileHandle")
    public String fileHandle(@RequestBody FileHandleDTO fileHandleDTO) {
        return fileClientService.fileHandle(fileHandleDTO);
    }

    @PostMapping("mountSetting")
    public String mountSetting(@RequestBody MountSettingDTO mountSettingDTO) {
        return fileClientService.mountSetting(mountSettingDTO);
    }

    @GetMapping("getAllMountSetting")
    public String getAllMountSetting(@RequestBody MountSettingDTO mountSettingDTO) {
        return fileClientService.mountSetting(mountSettingDTO);
    }
}
